﻿using Exam_Management.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Exam_Management.UI.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/
        public ActionResult Index()
        {
            return View();
        }
        public int Login(string userName, string pwd)
        {
            int i = 0;
            string result = HttpClientHelper.Client("get", Request.Url.Authority+"/Student/Login?userName="+userName+"&pwd="+pwd);
            if (result != "")
            {
                i = 1;
                Session["Student"] = result;
            }
            return i;
        }
    }
}